package com.ruoyi.business.domain;

import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.annotation.Excel.ColumnType;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * 客户表 customer
 * 
 * @author ruoyi
 */
public class Customer extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 客户编号 */
    @Excel(name = "客户编号", cellType = ColumnType.NUMERIC)
    private Long id;

    /** 客户姓名 */
    @Excel(name = "客户姓名")
    private String name;

    /** 联系方式 */
    @Excel(name = "联系方式")
    private String phone;

    /** 来源渠道 */
    @Excel(name = "来源渠道", cellType = ColumnType.NUMERIC)
    private DictType sourceValue;

    /** 意向校区 */
    @Excel(name = "意向校区", cellType = ColumnType.NUMERIC)
    private DictType schoolValue;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @NotBlank(message = "客户姓名不能为空")
    @Size(min = 0, max = 10, message = "客户姓名长度不能超过10个字符")
    public String getName()
    {
        return name;
    }

    public void setName(String name)
    {
        this.name = name;
    }

    @NotBlank(message = "联系方式不能为空")
    @Size(min = 0, max = 50, message = "联系方式长度不能超过11个字符")
    public String getPhone()
    {
        return phone;
    }

    public void setPhone(String phone)
    {
        this.phone = phone;
    }

    public DictType getSourceValue() {
        return sourceValue;
    }

    public void setSourceValue(DictType sourceValue) {
        this.sourceValue = sourceValue;
    }

    public DictType getSchoolValue() {
        return schoolValue;
    }

    public void setSchoolValue(DictType schoolValue) {
        this.schoolValue = schoolValue;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("name", getName())
            .append("phone", getPhone())
            .toString();
    }
}
